Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quarkus Common Removal: Data API queryBuilder #1022

Merged
merged 4 commits into from
Apr 11, 2024
Merged

Conversation

Yuqi-Du
Copy link
Contributor

@Yuqi-Du Yuqi-Du commented Apr 8, 2024

Couple of notes

  • Re-write builtCondition, eliminate the coupling with GRPC values
  • Integrate the CQL string and CQL statement values into one building process, this will avoid we iterate through the filterExpression twice(reduce time complexity) and have a cleaner code
  • Incorporate vector CQL query into new queryBuilder, this include the similarityScore, ANN order by and vector values
  • added QueryBuilderTest unit tests, probably will add more complex tests.

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

@Yuqi-Du Yuqi-Du changed the title Quarkus Common Removal: Data API querybuilder Quarkus Common Removal: Data API queryBuilder Apr 8, 2024
@Yuqi-Du Yuqi-Du marked this pull request as ready for review April 9, 2024 21:58
@Yuqi-Du Yuqi-Du requested a review from a team as a code owner April 9, 2024 21:58
new QueryBuilder()
.select()
.column(columnsToAdd)
.from(commandContext.namespace(), commandContext.collection())
.where(expression)
.limit(maxSortReadLimit())
.build();
final SimpleStatement simpleStatement = SimpleStatement.newInstance(query.getCql());
queries.add(simpleStatement.setPositionalValues(collect));
queries.add(query.queryToStatement());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks like new way of building is much more compact from caller side. :)
(based on removal of codelines in this class)

Copy link
Contributor

@tatu-at-datastax tatu-at-datastax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM: added some minor notes.

@Yuqi-Du Yuqi-Du merged commit 5e442d2 into main Apr 11, 2024
3 checks passed
@Yuqi-Du Yuqi-Du deleted the data-api-querybuilder branch April 11, 2024 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants